<!--{include file='admin/public/header.html'}-->
<!--编辑器JS-->
<link rel="stylesheet" href="view/admin/public/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="view/admin/public/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="view/admin/public/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="view/admin/public/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="view/admin/public/kindeditor/plugins/code/prettify.js"></script>
<!--编辑器給textarea赋值-->
<script>
$(function(){
	$("#form1").validationEngine();
});

var editor1,editor2;
   KindEditor.ready(function(K) {
       editor1 = K.create('textarea[name="content"]', {
           cssPath : 'view/admin/public/kindeditor/plugins/code/prettify.css',
           uploadJson : 'view/admin/public/kindeditor/php/upload_json.php',
           fileManagerJson : 'view/admin/public/kindeditor/php/file_manager_json.php',
           allowFileManager : true
       });

       //prettyPrint();
   }); 
</script>
        <div class="page-header">
          <h3 class="fl">增加内容</h3>
          <div class="user_message fr"><i class="icon-wrench"></i><a href="#">保存页面排序</a></div>
          <div class="cl"></div>
        </div>
        <form name="form1" id="form1" class="form-inline" action="" method="post">
       <table class="table set_table">
        	<thead>
            <tr>
              <th width="100" >功 能</th>
              <th >配 置</th>
              <th width="120">&nbsp;</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td valign="middle">分类</td>
              <td>
              <select class="span3 parentCate" name="cateid"  >
                <option value="0" >选择分类</option>
             <!--{foreach from=$cate key=k item=v}-->
                <optgroup label="<!--{$v.categoryname}-->"><!--{$v.categoryname}--></option>
                <!--{foreach from=$v.items key=ik item=iv}-->
	                <!--{if $data.cateid == $iv.id}-->
	                	<option value="<!--{$iv.id}-->"  type="<!--{$iv.type}-->" selected="selected" ><!--{$iv.categoryname}--></option>
	                <!--{else}-->
	                	<option value="<!--{$iv.id}-->"  type="<!--{$iv.type}-->" ><!--{$iv.categoryname}--></option>
	                <!--{/if}-->
                <!--{/foreach}-->
            <!--{/foreach}-->
              </select>
              <td>
              </td>
            </tr>
            <tr>
              <td valign="middle">内容标题</td>
              <td>
              <input name="title" id="title" type="text" class="span4"  value="<!--{$data.title}-->" />
              <td>
              </td>
            </tr>
            <tr>
              <td valign="middle">关键词</td>
              <td>
              <input name="keywords" id="keywords" type="text" class="span4" value="<!--{$data.keywords}-->" />
              <td>
              </td>
            </tr>
            <tr>
              <td valign="middle">描述</td>
              <td>
              <textarea name="description" cols="" rows="5" class="span9"><!--{$data.description}--></textarea>
              <td>
              </td>
            </tr>
            <tr class="selected_4">
              <td valign="middle">内容</td>
              <td><textarea name="content" cols="" rows="20" class="span9"><!--{$data.content}--></textarea></td>
              <td>
              </td>
            </tr>
          </tbody>
        </table>
        

		<p class="border_top">
		<button type="submit" class="btn btn-primary btn-small input-small">修改</button>
		</p>
        <div class="copyright"></div>
</form>

<!--文字颜色JS-->

<script type="text/javascript" src="view/admin/public/js/bootstrap-colorpicker.js"></script>
<script>
	$(function(){
	window.prettyPrint && prettyPrint()

		var bodyStyle = $('.span4 ')[0].style;
		$('#cp4').colorpicker().on('changeColor', function(ev){
			bodyStyle.borderColor = ev.color.toHex();
		});
	});
</script>
 <!--{include file='admin/public/footer.html'}-->
